package com.juyu.miliao.common.builder;

import com.juyu.miliao.common.constant.BeansType;
import com.juyu.miliao.common.domain.dto.BillDetailBeansDTO;

import java.time.LocalDate;
import java.time.LocalDateTime;

public class BillDetailBeansMqMessageBuilder {

    private BillDetailBeansDTO billDetailBeansDTO = new BillDetailBeansDTO();

    public BillDetailBeansMqMessageBuilder id(int id){
        billDetailBeansDTO.setId(id);
        return this;
    }
    public BillDetailBeansMqMessageBuilder userId(long userId){
        billDetailBeansDTO.setUserId(userId);
        return this;
    }
    public BillDetailBeansMqMessageBuilder beansType(BeansType beansType){
        billDetailBeansDTO.setBeansType(beansType.getCode());
        return this;
    }

    public BillDetailBeansMqMessageBuilder beans(long beans){
        billDetailBeansDTO.setBeans(beans);
        return this;
    }

    public BillDetailBeansMqMessageBuilder createTime(LocalDateTime createTime){
        billDetailBeansDTO.setCreateTime(createTime);
        return this;
    }

    public BillDetailBeansMqMessageBuilder createDate(LocalDate createDate){
        billDetailBeansDTO.setCreateDate(createDate);
        return this;
    }

    public BillDetailBeansDTO build(){
        return billDetailBeansDTO;
    }
}
